]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Call _activate() directly when clicking the window preview
authorJonas Dreßler <verdre@v0yd.nl>
Mon, 8 Jun 2020 12:49:09 +0000 (14:49 +0200)
committerJonas Dreßler <verdre@v0yd.nl>
Tue, 16 Jun 2020 11:55:17 +0000 (13:55 +0200)
We can remove the simply callback function in favour of an anonymous
function here.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307

js/ui/workspace.js

index 7370a137a91278a103ea55cf54e98d0360d0a163..a5cd522d31331942f35cf0eb7568089bf843bd7b 100644 (file)
@@ -247,7 +247,7 @@ var WindowPreview = GObject.registerClass({
         this.y = this.boundingBox.y;
 
         let clickAction = new Clutter.ClickAction();
-        clickAction.connect('clicked', this._onClicked.bind(this));
+        clickAction.connect('clicked', () => this._activate());
         clickAction.connect('long-press', this._onLongPress.bind(this));
         this.add_action(clickAction);
         this.connect('destroy', this._onDestroy.bind(this));
@@ -686,10 +686,6 @@ var WindowPreview = GObject.registerClass({
         return super.vfunc_key_press_event(keyEvent);
     }
 
-    _onClicked() {
-        this._activate();
-    }
-
     _onLongPress(action, actor, state) {
         // Take advantage of the Clutter policy to consider
         // a long-press canceled when the pointer movement